package ch05.aop;

import org.aspectj.lang.JoinPoint;

import java.util.Arrays;

public class UserDaoOther {
    public void before(JoinPoint jp) {
        System.out.println("打开数据库连接");
        System.out.println(jp.getTarget());
        System.out.println(jp.getSignature().getName());
        System.out.println(jp.getArgs()) ;

    }

    public void afterReturning(JoinPoint jp, Object result) {
        System.out.println("关才数据库");
        System.out.println(jp.getTarget());
        System.out.println(jp.getSignature().getName());
        System.out.println(jp.getArgs()) ;
        System.out.println(result);
    }
}
